* lisp/progmodes/etags.el (visit-tags-table-buffer): Give a more precise
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 29 Nov 2012 20:19:11 +0000 (15:19 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 29 Nov 2012 20:19:11 +0000 (15:19 -0500)
error message when the file doesn't exist.

lisp/ChangeLog
lisp/progmodes/etags.el

index cb722fa012af09e0afe10ec71317b50142ec69fc..b32235b625ebaa123f9d6e1ea23b8046d336e619 100644 (file)
@@ -1,3 +1,8 @@
+2012-11-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/etags.el (visit-tags-table-buffer): Give a more precise
+       error message when the file doesn't exist (bug#12974).
+
 2012-11-29  Kelly Dean  <kellydeanch@yahoo.com>  (tiny change)
 
        * simple.el (activate-mark): Run activate-mark-hook (bug#13027).
index 071a0fb6037698a6181087548b6ae7a168139ecf..067d89781d25fc10a135bbecb84eefd57e6212b4 100644 (file)
@@ -702,7 +702,9 @@ Returns t if it visits a tags table, or nil if there are no more in the list."
        (kill-local-variable 'tags-file-name)
        (if (eq local-tags-file-name tags-file-name)
            (setq tags-file-name nil))
-       (user-error "File %s is not a valid tags table"
+       (user-error (if (file-exists-p local-tags-file-name)
+                        "File %s is not a valid tags table"
+                      "File %s does not exist")
                     local-tags-file-name)))))
 
 (defun tags-reset-tags-tables ()